import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import {Form,FormItem,Input,Button,Select,Option,Message,Container,Main,Aside,Menu,MenuItem,Table,TableColumn,Drawer,DatePicker,Checkbox,Pagination,Link,Upload,Tabs,TabPane} from 'element-ui'

//生生世世生生世世生生世世

Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Button)
Vue.use(Select)
Vue.use(Option)
Vue.use(Container)
Vue.use(Main)
Vue.use(Aside)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Drawer)
Vue.use(DatePicker)
Vue.use(Checkbox)
Vue.use(Pagination)
Vue.use(Link)
Vue.use(Upload)
Vue.use(Tabs)
Vue.use(TabPane)

Vue.prototype.$message = Message;

Vue.config.productionTip = false
// 筛选后的路由动态添加到路由列表中
if(store.state.userinfo){
  router.addRoutes( store.getters.getRoute );
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

